package com.berchen.数据结构.二叉树.赫夫曼树;


public class TreeNode implements Comparable{
    int value;
    TreeNode left;
    TreeNode right;

    public TreeNode(int value) {
        this.value = value;
    }

    @Override
    public String toString() {
        return "TreeNode{" +
                "value=" + value +
                '}';
    }

    @Override
    public int compareTo(Object o) {
        TreeNode node= (TreeNode) o;
        // 从小到大
        return this.value- node.value;
    }
}
